package test.org.nanotek.jpa.persistence.artist.name;

import org.nanotek.Builder;
import org.nanotek.base.artist.name.ArtistName;
import org.nanotek.base.person.name.NamePersonType;

import test.org.nanotek.jpa.name.namepart.NamePartBuilder;

public class ArtistNameBuilder implements Builder<ArtistName> {

	ArtistName artistName = new ArtistName(); 
	
	public ArtistNameBuilder() {
	}

	public ArtistNameBuilder setGivenName (String value) 
	{ 
		
		artistName.getName().add(new NamePartBuilder().setName(NamePersonType.GivenName.name(), NamePersonType.GivenName).build());
		return this; 
	}
	
	public ArtistNameBuilder setLastName (String value) 
	{ 
		
		artistName.getName().add(new NamePartBuilder().setName(NamePersonType.LastName.name(), NamePersonType.LastName).build());
		return this; 
	}
	
	@Override
	public ArtistName build() {
		return artistName;
	}

}
